{{extend 'layout.html'}}

<div id="content" style="background-color:white;">

<h2>{{=T("Single Segment Report")}}</h2>
{{=form}}
</br>
<h1>{{=program_title}}</h1>
<h2>{{=segment.start_time}} {{=T("to")}} {{=segment.end_time}}</h2>
<h2>{{=T("Pledges / Dollars for Program")}}</h2>
<table border="1">
<tr>
<th>{{=T("Pledge Number")}}</th><th>{{=T("Amount")}}</th><th>{{=T("Donor")}}</th><th>{{=T("Comment")}}</th>
</tr>
{{for ct, i in enumerate(pledge_list):}}
<tr>
<td>{{=ct+1}}</td><td>{{=i['amount']}}</td><td>{{=i['name']}}</td><td>{{=i['comment']}}</td>
</tr>
{{pass}}
</table>
<h2>{{=T("Total Pledges")}}: {{=segment_total_pledges}}</h2>
<h2>{{=T("Total Dollars")}}: ${{=segment_total_dollars}}</h2>
{{if segment_total_pledges > 0:}}
<h2>{{=T("Average Pledge Amount")}}: {{=segment_total_dollars/segment_total_pledges}}</h2>
{{else:}}
<h2>{{=T("Average Pledge Amount")}}: $0</h2>
{{pass}}
</div>
